package com.linuxgt.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * Created with IntelliJ IDEA.
 * User: Administrator
 * Date: 14-8-28
 * Time: 下午5:46
 * To change this template use File | Settings | File Templates.
 */

@Controller
@RequestMapping("/freemarker")
public class HelloWorldController {
    @RequestMapping("/hello.do")
    public String sayHello(ModelMap map){
        System.out.println("say Hello...");
        map.addAttribute("name","World!");
        return "/hello.ftl";
    }
    @RequestMapping("/hi")
    public String sayHi(ModelMap map){
        System.out.println("say hi...");
        map.addAttribute("name","jojo");
        return "/hi.ftl";
    }
	@RequestMapping("/jsp")
    public String jspRequest(ModelMap map) {
        System.out.println("jspRequest");
        map.addAttribute("name", "jsp");
        return "/temp.jsp";
    }
}
